

#ifndef __TOUCH_H__
#define __TOUCH_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

/*
* @brief    Initialize the touch screen
* @retval   0: success
*           -1: failed
*/
int TouchInit(void);

/*
* @brief    Check if the touch screen is pressed
* @retval   0: Not pressed
*           1: Pressed
*/
int TouchIsPressed(void);

/*
* @brief    TouchGetXY
* @param    mode:   0: screen coordinates;  1: real coordinates; 
* @retval   0:      get coordinates successful
*           < 0:    get coordinates failed
*/
int TouchGetXY(uint8_t mode, uint16_t *x, uint16_t *y);

#ifdef __cplusplus
}
#endif


#endif // __TOUCH_H__
